home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 October / Enter 10 2006.iso / boot / isolinux / initrd / in / usr / lib / setup / SeTkeymap < prev    next >
Encoding:
Text File  |  2006-03-29  |  4.7 KB  |  177 lines

  1. #!/bin/sh
  2. # Copyright 1993, 1999, 2002 Patrick Volkerding, Moorhead, MN.
  3. # Use and redistribution covered by the same terms as the "setup" script.
  4.  
  5. # Added NLS support by Damian Rakowski <maestromae@kateos.org>
  6. export TEXTDOMAIN=SeTkeymap
  7. TMP=/var/log/setup/tmp
  8. RDIR=/dev/tty4
  9. if [ ! -d $TMP ]; then
  10.   mkdir -p $TMP
  11. fi
  12. while [ 0 ]; do
  13. dialog --title "`gettext "KEYBOARD MAP SELECTION"`" --menu "`gettext "You may select one \
  14. of the following keyboard maps.  If you do not select a keyboard \
  15. map, 'us.map' (the US keyboard map) is the default.  Use the UP/DOWN \
  16. arrow keys and PageUp/PageDown to scroll \
  17. through the whole list of choices."`" \
  18. 22 55 11 \
  19. "qwerty/us.map" "" \
  20. "azerty/azerty.map" "" \
  21. "azerty/be-latin1.map" "" \
  22. "azerty/fr-latin1.map" "" \
  23. "azerty/fr-latin9.map" "" \
  24. "azerty/fr-pc.map" "" \
  25. "azerty/fr.map" "" \
  26. "azerty/wangbe.map" "" \
  27. "azerty/wangbe2.map" "" \
  28. "dvorak/ANSI-dvorak.map" "" \
  29. "dvorak/dvorak-l.map" "" \
  30. "dvorak/dvorak-r.map" "" \
  31. "dvorak/dvorak.map" "" \
  32. "fgGIod/tr_f-latin5.map" "" \
  33. "fgGIod/trf.map" "" \
  34. "qwerty/bg-cp1251.map" "" \
  35. "qwerty/bg-cp855.map" "" \
  36. "qwerty/bg_bds-cp1251.map" "" \
  37. "qwerty/bg_bds-utf8.map" "" \
  38. "qwerty/bg_pho-cp1251.map" "" \
  39. "qwerty/bg_pho-utf8.map" "" \
  40. "qwerty/br-abnt.map" "" \
  41. "qwerty/br-abnt2.map" "" \
  42. "qwerty/br-latin1-abnt2.map" "" \
  43. "qwerty/br-latin1-us.map" "" \
  44. "qwerty/by.map" "" \
  45. "qwerty/cf.map" "" \
  46. "qwerty/cz-cp1250.map" "" \
  47. "qwerty/cz-lat2-prog.map" "" \
  48. "qwerty/cz-lat2.map" "" \
  49. "qwerty/cz.map" "" \
  50. "qwerty/defkeymap.map" "" \
  51. "qwerty/defkeymap_V1.0.map" "" \
  52. "qwerty/dk-latin1.map" "" \
  53. "qwerty/dk.map" "" \
  54. "qwerty/emacs.map" "" \
  55. "qwerty/emacs2.map" "" \
  56. "qwerty/es-cp850.map" "" \
  57. "qwerty/es.map" "" \
  58. "qwerty/et-nodeadkeys.map" "" \
  59. "qwerty/et.map" "" \
  60. "qwerty/fi-latin1.map" "" \
  61. "qwerty/fi-latin9.map" "" \
  62. "qwerty/fi.map" "" \
  63. "qwerty/gr-pc.map" "" \
  64. "qwerty/gr.map" "" \
  65. "qwerty/hu101.map" "" \
  66. "qwerty/il-heb.map" "" \
  67. "qwerty/il-phonetic.map" "" \
  68. "qwerty/il.map" "" \
  69. "qwerty/is-latin1-us.map" "" \
  70. "qwerty/is-latin1.map" "" \
  71. "qwerty/it-ibm.map" "" \
  72. "qwerty/it.map" "" \
  73. "qwerty/it2.map" "" \
  74. "qwerty/jp106.map" "" \
  75. "qwerty/la-latin1.map" "" \
  76. "qwerty/lt.baltic.map" "" \
  77. "qwerty/lt.l4.map" "" \
  78. "qwerty/lt.map" "" \
  79. "qwerty/mk-cp1251.map" "" \
  80. "qwerty/mk-utf.map" "" \
  81. "qwerty/mk.map" "" \
  82. "qwerty/mk0.map" "" \
  83. "qwerty/nl.map" "" \
  84. "qwerty/nl2.map" "" \
  85. "qwerty/no-latin1.map" "" \
  86. "qwerty/no.map" "" \
  87. "qwerty/pc110.map" "" \
  88. "qwerty/pl.map" "" \
  89. "qwerty/pl2.map" "" \
  90. "qwerty/pt-latin1.map" "" \
  91. "qwerty/pt-latin9.map" "" \
  92. "qwerty/ro_win.map" "" \
  93. "qwerty/ru-cp1251.map" "" \
  94. "qwerty/ru-ms.map" "" \
  95. "qwerty/ru-yawerty.map" "" \
  96. "qwerty/ru.map" "" \
  97. "qwerty/ru1.map" "" \
  98. "qwerty/ru2.map" "" \
  99. "qwerty/ru3.map" "" \
  100. "qwerty/ru4.map" "" \
  101. "qwerty/ru_win.map" "" \
  102. "qwerty/se-fi-ir209.map" "" \
  103. "qwerty/se-fi-lat6.map" "" \
  104. "qwerty/se-ir209.map" "" \
  105. "qwerty/se-lat6.map" "" \
  106. "qwerty/sk-prog-qwerty.map" "" \
  107. "qwerty/sk-qwerty.map" "" \
  108. "qwerty/speakup-jfw.map" "" \
  109. "qwerty/speakupmap.map" "" \
  110. "qwerty/sr-cy.map" "" \
  111. "qwerty/sv-latin1.map" "" \
  112. "qwerty/tr_q-latin5.map" "" \
  113. "qwerty/tralt.map" "" \
  114. "qwerty/trq.map" "" \
  115. "qwerty/ua-utf-ws.map" "" \
  116. "qwerty/ua-utf.map" "" \
  117. "qwerty/ua-ws.map" "" \
  118. "qwerty/ua.map" "" \
  119. "qwerty/uk.map" "" \
  120. "qwerty/us-acentos.map" "" \
  121. "qwerty/us.map" "" \
  122. "qwertz/croat.map" "" \
  123. "qwertz/cz-us-qwertz.map" "" \
  124. "qwertz/de-latin1-nodeadkeys.map" "" \
  125. "qwertz/de-latin1.map" "" \
  126. "qwertz/de.map" "" \
  127. "qwertz/de_CH-latin1.map" "" \
  128. "qwertz/fr_CH-latin1.map" "" \
  129. "qwertz/fr_CH.map" "" \
  130. "qwertz/hu.map" "" \
  131. "qwertz/sg-latin1-lk450.map" "" \
  132. "qwertz/sg-latin1.map" "" \
  133. "qwertz/sg.map" "" \
  134. "qwertz/sk-prog-qwertz.map" "" \
  135. "qwertz/sk-qwertz.map" "" \
  136. "qwertz/slovene.map" "" \
  137.  2> $TMP/SeTkeymap
  138.  if [ ! $? = 0 ]; then
  139.   rm -f $TMP/SeTkeymap
  140.   exit
  141.  fi
  142.  MAPNAME="`cat $TMP/SeTkeymap`"
  143.  MAPNAME="`basename $MAPNAME`"
  144.  echo $MAPNAME > $TMP/SeTkeymap
  145.  BMAP="`basename $MAPNAME .map`.bmap"
  146.  tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap
  147.  
  148.  while [ 0 ]; do
  149.   dialog --title "`gettext "KEYBOARD TEST"`" --inputbox \
  150.   "`gettext "OK, the new map is now installed.  You may now test it by typing \
  151.   anything you want.  To quit testing the keyboard, enter 1 on a \
  152.   line by itself to accept the map and go on, or 2 on a line by \
  153.   itself to reject the current keyboard map and select a new one."`" \
  154.   11 70 2> $TMP/keytest
  155.   if [ $? = 1 ]; then
  156.    REPLY="n"
  157.    break;
  158.   fi
  159.   REPLY="`cat $TMP/keytest`"
  160.   rm -f $TMP/keytest
  161.   if [ "$REPLY" = "1" -o "$REPLY" = "2" ]; then
  162.    break;
  163.   fi
  164.  done
  165.  if [ "$REPLY" = "1" ]; then
  166.   # Make a persistent (P) copy so starting setup won't erase it:
  167.   cp $TMP/SeTkeymap $TMP/Pkeymap
  168.   break;
  169.  else
  170.   rm -f $TMP/$MAPNAME
  171.   rm -f $TMP/SeTkeymap $TMP/Pkeymap
  172.   # Clear bad selection:
  173.   tar xzOf /etc/keymaps.tar.gz us.bmap | loadkmap
  174.   continue;
  175.  fi
  176. done
  177.